/**
 * Created by youngpan on 2017/1/8.
 */
define(['app'],function(app){
    //头部指令
    app.directive("cHeader",function () {
        return{
         //头部模板
         template:
         '<div class="home-header">' +
               '<div class="header-top">' +
                    '<a href="#/home">' +
                        '<img src="images/header_logo.png">' +
                    '</a>' +
                    '<a href="#">' +
                        '<img src="images/header_app.png">' +
                    '</a>' +
               '</div>' +
               '<div class="header-bottom">' +
                    '<input type="text" placeholder="请输入你想比价的商品">' +
                    '<input type="submit" value="搜索">' +
               '</div>' +
         '</div>'
        }
    });
    //底部指令
    app.directive("cFooter",function () {
        return{
         template:
         '<div class="home-footer">' +
              '<div class="footer-top">' +
                  '<a href="#">登陆{{aaa}}</a>' +
                  '<a href="#">注册</a>' +
                  '<a href="javascript:scroll(0,0)">' +
                      '<img src="images/top.jpg">返回顶部' +
                  '</a>' +
              '</div>' +
              '<div class="footer-bottom">' +
                  '<p>手机APP下载 慢慢买手机版--掌上比价平台</p>' +
                  '<p>m.manmanbuy.com</p>' +
              '</div>' +
         '</div>'
        }
    });
    //无搜索框的公共头部
    app.directive('titleHeader', function () {
        return{
            transclude:true,
            template:
            '<div class="titleHeader">'+
                '<a href="#/" class="history iconfont icon-fa-left"></a>'+
                '<h1 class="title" ng-transclude=""></h1>'+
                '<a href="#" class="img-box">' +
                    '<img src="images/header_app.png">' +
                '</a>'+
            '</div>'
        }
    })
});